<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    
    <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Hugo 0.68.3 with theme Tranquilpeak 0.4.7-BETA">
<meta name="author" content="唐宋缘明卿">
<meta name="keywords" content="git, 版本管理, development, next-gen">
<meta name="description" content="说起git，就像生活中的许多伟大事物一样，Git也诞生于一个大举创新的年代。">


<meta property="og:description" content="说起git，就像生活中的许多伟大事物一样，Git也诞生于一个大举创新的年代。">
<meta property="og:type" content="article">
<meta property="og:title" content="Git之一键三连&amp;合作开发">
<meta name="twitter:title" content="Git之一键三连&amp;合作开发">
<meta property="og:url" content="https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
<meta property="twitter:url" content="https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
<meta property="og:site_name" content="唐宋缘明卿的博客">
<meta property="og:description" content="说起git，就像生活中的许多伟大事物一样，Git也诞生于一个大举创新的年代。">
<meta name="twitter:description" content="说起git，就像生活中的许多伟大事物一样，Git也诞生于一个大举创新的年代。">
<meta property="og:locale" content="zh-cn">

  
    <meta property="article:published_time" content="2016-07-02T14:36:41">
  
  
    <meta property="article:modified_time" content="2016-07-02T14:36:41">
  
  
  
    
      <meta property="article:section" content="git">
    
  
  
    
      <meta property="article:tag" content="合作开发">
    
      <meta property="article:tag" content="版本管理">
    
      <meta property="article:tag" content="git">
    
      <meta property="article:tag" content="仓库">
    
  


<meta name="twitter:card" content="summary">







  <meta property="og:image" content="//d1u9biwaxjngwg.cloudfront.net/welcome-to-tranquilpeak/city-750.jpg">
  <meta property="twitter:image" content="//d1u9biwaxjngwg.cloudfront.net/welcome-to-tranquilpeak/city-750.jpg">


  <meta property="og:image" content="//d1u9biwaxjngwg.cloudfront.net/welcome-to-tranquilpeak/city.jpg">
  <meta property="twitter:image" content="//d1u9biwaxjngwg.cloudfront.net/welcome-to-tranquilpeak/city.jpg">




  <meta property="og:image" content="http://img.qq22.com.cn/uploads/4134/gubtyqxfhz2.jpg?68513786">
  <meta property="twitter:image" content="http://img.qq22.com.cn/uploads/4134/gubtyqxfhz2.jpg?68513786">


    <title>Git之一键三连&amp;合作开发</title>

    <link rel="icon" href="https://gaohaihang.gitee.io/ghhs_technology_blog/favicon.png">
    

    

    <link rel="canonical" href="https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">

    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.min.css" integrity="sha256-vuXZ9LGmmwtjqFX1F+EKin1ThZMub58gKULUyf0qECk=" crossorigin="anonymous" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/helpers/jquery.fancybox-thumbs.min.css" integrity="sha256-SEa4XYAHihTcEP1f5gARTB2K26Uk8PsndQYHQC1f4jU=" crossorigin="anonymous" />
    
    
    <link rel="stylesheet" href="https://gaohaihang.gitee.io/ghhs_technology_blog/css/style-twzjdbqhmnnacqs0pwwdzcdbt8yhv8giawvjqjmyfoqnvazl0dalmnhdkvp7.min.css" />
    
    

    
      
    
    
  </head>

  <body>
    <div id="blog">
      <header id="header" data-behavior="5">
  <i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i>
  <div class="header-title">
    <a class="header-title-link" href="https://gaohaihang.gitee.io/ghhs_technology_blog/">唐宋缘明卿的博客</a>
  </div>
  
    
      <a class="header-right-picture "
         href="https://gaohaihang.gitee.io/ghhs_technology_blog/#about">
    
    
    
      
        <img class="header-picture" src="http://img.qq22.com.cn/uploads/4134/gubtyqxfhz2.jpg?68513786" alt="作者的图片" />
      
    
    </a>
  
</header>

      <nav id="sidebar" data-behavior="5">
  <div class="sidebar-container">
    
      <div class="sidebar-profile">
        <a href="https://gaohaihang.gitee.io/ghhs_technology_blog/#about">
          <img class="sidebar-profile-picture" src="http://img.qq22.com.cn/uploads/4134/gubtyqxfhz2.jpg?68513786" alt="作者的图片" />
        </a>
        <h4 class="sidebar-profile-name">唐宋缘明卿</h4>
        
          <h5 class="sidebar-profile-bio">弱小的人，才习惯嘲讽与否定；内心强大的人，从不吝啬赞美与鼓励。</h5>
        
      </div>
    
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://gaohaihang.gitee.io/ghhs_technology_blog/">
    
      <i class="sidebar-button-icon fa fa-lg fa-home"></i>
      
      <span class="sidebar-button-desc">首页</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://gaohaihang.gitee.io/ghhs_technology_blog/categories">
    
      <i class="sidebar-button-icon fa fa-lg fa-bookmark"></i>
      
      <span class="sidebar-button-desc">分类</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://gaohaihang.gitee.io/ghhs_technology_blog/tags">
    
      <i class="sidebar-button-icon fa fa-lg fa-tags"></i>
      
      <span class="sidebar-button-desc">标签</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://gaohaihang.gitee.io/ghhs_technology_blog/archives">
    
      <i class="sidebar-button-icon fa fa-lg fa-archive"></i>
      
      <span class="sidebar-button-desc">归档</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://gaohaihang.gitee.io/ghhs_technology_blog/resume">
    
      <i class="sidebar-button-icon fa fa-address-card"></i>
      
      <span class="sidebar-button-desc">Resume</span>
    </a>
  </li>


    </ul>
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://github.com/ghh617415200" target="_blank" rel="noopener">
    
      <i class="sidebar-button-icon fa fa-lg fa-github"></i>
      
      <span class="sidebar-button-desc">GitHub</span>
    </a>
  </li>

  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://stackoverflow.com/users/13559927/ghh-cirs" target="_blank" rel="noopener">
    
      <i class="sidebar-button-icon fa fa-lg fa-stack-overflow"></i>
      
      <span class="sidebar-button-desc">Stack Overflow</span>
    </a>
  </li>


    </ul>
    <ul class="sidebar-buttons">
      
  <li class="sidebar-button">
    
      <a class="sidebar-button-link " href="https://gaohaihang.gitee.io/ghhs_technology_blog/index.xml">
    
      <i class="sidebar-button-icon fa fa-lg fa-rss"></i>
      
      <span class="sidebar-button-desc">Rss</span>
    </a>
  </li>


    </ul>
  </div>
</nav>

      
  <div class="post-header-cover
              text-center
              "
       style="background-image:url('//d1u9biwaxjngwg.cloudfront.net/welcome-to-tranquilpeak/city.jpg')"
       data-behavior="5">
    
      <div class="post-header main-content-wrap text-center">
  
    <h1 class="post-title" itemprop="headline">
      Git之一键三连&amp;合作开发
    </h1>
  
  
  <div class="postShorten-meta post-meta">
    
      <time itemprop="datePublished" datetime="2016-07-02T14:36:41&#43;08:00">
        
  七月 2, 2016

      </time>
    
    
  
  
    <span>发布在</span>
    
      <a class="category-link" href="https://gaohaihang.gitee.io/ghhs_technology_blog/categories/git">git</a>
    
  

  </div>

</div>
    
  </div>


      <div id="main" data-behavior="5"
        class="hasCover
               hasCoverMetaIn
               ">
        <article class="post" itemscope itemType="http://schema.org/BlogPosting">
          
          
          <div class="post-content markdown" itemprop="articleBody">
            <div class="main-content-wrap">
              <p>说起git，就像生活中的许多伟大事物一样，Git也诞生于一个大举创新的年代。</p>
<p>由于2005年，开发BitKeeper的公司与Linux开源社区结束了合作关系，收回了社区免费使用BitKeeper的权利。迫使社区成员们去开发属于自己的版本管理系统，这就是GIT的来源。</p>
<p>与此同时，他们对于这套新的系统制定了若干目标：</p>
<ul>
<li>速度</li>
<li>简单的设计</li>
<li>对非线性开发模式的强力支持（允许成百上千的分支并行开发）</li>
<li>完全分布式</li>
<li>有能力高效管理类似Linux内核一样的超大规模项目</li>
</ul>
<p>话不多说，我们直接进入Git的使用吧，耐心读下去，你也能熟练的使用GIT。</p>
<h2 id="在现有目录中初始化仓库">在现有目录中初始化仓库</h2>
<p>如果是打算使用git对现有项目进行管理，就在该项目目录中，进入命令窗口</p>
<pre><code>git init
</code></pre><p>但是要注意的是，我们在这里仅仅是做了一个初始化的操作，并没有追踪你的文件，于是我们需要</p>
<pre><code>git add -A
git commit -m &quot;first commit&quot;
</code></pre><p>正常情况下，在独立开发的情景中，比如你使用github或者gitee进行远程仓库创建，创建仓库好之后，会有官方的文档指导你进行操作，在个人开发中，基本上常用好<strong>git add</strong>和<strong>git commit</strong> 就可以随时将你本地的项目存储到远程仓库中啦！</p>
<h2 id="使用git进行多人开发">使用GIT进行多人开发</h2>
<p>在<strong>clone</strong>了很多项目之后，感叹他人智勇之余，是不是心中也有一些小痒痒，恨不得能参与其中，和他们一同挥斥方遒呢？别着急，这就来教你。</p>
<ol>
<li>首先，联系你想要参与的项目的管理员，申请成为项目的开发者。</li>
<li>当管理员通过你的申请时，会帮你创建一个项目的分支。</li>
<li>我们要做的事就是在本地也创建一个分支，远程同步到项目仓库里的你的分支</li>
<li><strong>clone</strong>下项目，在同级路径中创建一个属于你的文件夹，使用<strong>git branch</strong>检查分支。</li>
<li>一般来说，你<strong>clone</strong>的项目都只有一个<strong>master</strong>分支，此时你你需要先创建<strong>develop</strong>分支，因为通常情况下<strong>master</strong>分支都是稳定运行的版本，而在<strong>develop</strong>版本中进行调试。</li>
<li>使用<code>git branch develop origin/develop </code>创建本地同步远程仓库的<strong>develop</strong>分支。</li>
<li>同理，使用<code>git branch youritem origin/youritem </code>创建你的本地同步远程仓库的专属个人分支。</li>
<li>接下来，使用<code>git checkout youritem </code>切换到你的分支上，就可以进行开发了！</li>
</ol>
<p>在你觉得肝的差不多之后，想要将你写的内容同步到<strong>develop</strong>上进行测试，这个时候你首先对你的分支进行一键三连，在你自己的分支上做一个版本存储，然后切换到<strong>develop</strong>分支，将你的所作合并到<strong>develop</strong>分支上（偷偷告诉你，这里使用<code>git merge youritem</code> 进行合并哦）</p>
              
            </div>
          </div>
          <div id="post-footer" class="post-footer main-content-wrap">
            
              
                
                
                  <div class="post-footer-tags">
                    <span class="text-color-light text-small">标签</span><br/>
                    
  <a class="tag tag--primary tag--small" href="https://gaohaihang.gitee.io/ghhs_technology_blog/tags/%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">合作开发</a>

  <a class="tag tag--primary tag--small" href="https://gaohaihang.gitee.io/ghhs_technology_blog/tags/%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86/">版本管理</a>

  <a class="tag tag--primary tag--small" href="https://gaohaihang.gitee.io/ghhs_technology_blog/tags/git/">git</a>

  <a class="tag tag--primary tag--small" href="https://gaohaihang.gitee.io/ghhs_technology_blog/tags/%E4%BB%93%E5%BA%93/">仓库</a>

                  </div>
                
              
            
            <div class="post-actions-wrap">
  
      <nav >
        <ul class="post-actions post-action-nav">
          
            <li class="post-action">
              
                <a class="post-action-btn btn btn--default tooltip--top" href="https://gaohaihang.gitee.io/ghhs_technology_blog/2017/02/%E5%88%9D%E8%AF%86scrapy%E6%A1%86%E6%9E%B6/" data-tooltip="初识Scrapy框架">
              
                  <i class="fa fa-angle-left"></i>
                  <span class="hide-xs hide-sm text-small icon-ml">下一篇</span>
                </a>
            </li>
            <li class="post-action">
              
                <a class="post-action-btn btn btn--default tooltip--top" href="https://gaohaihang.gitee.io/ghhs_technology_blog/2016/04/python%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E6%9C%BA%E5%88%B6/" data-tooltip="Python垃圾回收机制">
              
                  <span class="hide-xs hide-sm text-small icon-mr">上一篇</span>
                  <i class="fa fa-angle-right"></i>
                </a>
            </li>
          
        </ul>
      </nav>
    <ul class="post-actions post-action-share" >
      
        <li class="post-action hide-lg hide-md hide-sm">
          <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions">
            <i class="fa fa-share-alt"></i>
          </a>
        </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
              <i class="fa fa-facebook-official"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://twitter.com/intent/tweet?text=https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://plus.google.com/share?url=https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        
      
      
        <li class="post-action">
          <a class="post-action-btn btn btn--default" href="#disqus_thread">
            <i class="fa fa-comment-o"></i>
          </a>
        </li>
      
      <li class="post-action">
        
          <a class="post-action-btn btn btn--default" href="#">
        
          <i class="fa fa-list"></i>
        </a>
      </li>
    </ul>
  
</div>

            
              
                <div id="disqus_thread">
  <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
              
            
          </div>
        </article>
        <footer id="footer" class="main-content-wrap">
  <span class="copyrights">
    &copy; 2020 唐宋缘明卿. All Rights Reserved
  </span>
</footer>

      </div>
      <div id="bottom-bar" class="post-bottom-bar" data-behavior="5">
        <div class="post-actions-wrap">
  
      <nav >
        <ul class="post-actions post-action-nav">
          
            <li class="post-action">
              
                <a class="post-action-btn btn btn--default tooltip--top" href="https://gaohaihang.gitee.io/ghhs_technology_blog/2017/02/%E5%88%9D%E8%AF%86scrapy%E6%A1%86%E6%9E%B6/" data-tooltip="初识Scrapy框架">
              
                  <i class="fa fa-angle-left"></i>
                  <span class="hide-xs hide-sm text-small icon-ml">下一篇</span>
                </a>
            </li>
            <li class="post-action">
              
                <a class="post-action-btn btn btn--default tooltip--top" href="https://gaohaihang.gitee.io/ghhs_technology_blog/2016/04/python%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E6%9C%BA%E5%88%B6/" data-tooltip="Python垃圾回收机制">
              
                  <span class="hide-xs hide-sm text-small icon-mr">上一篇</span>
                  <i class="fa fa-angle-right"></i>
                </a>
            </li>
          
        </ul>
      </nav>
    <ul class="post-actions post-action-share" >
      
        <li class="post-action hide-lg hide-md hide-sm">
          <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions">
            <i class="fa fa-share-alt"></i>
          </a>
        </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
              <i class="fa fa-facebook-official"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://twitter.com/intent/tweet?text=https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
        
          <li class="post-action hide-xs">
            <a class="post-action-btn btn btn--default" target="new" href="https://plus.google.com/share?url=https://gaohaihang.gitee.io/ghhs_technology_blog/2016/07/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91/">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        
      
      
        <li class="post-action">
          <a class="post-action-btn btn btn--default" href="#disqus_thread">
            <i class="fa fa-comment-o"></i>
          </a>
        </li>
      
      <li class="post-action">
        
          <a class="post-action-btn btn btn--default" href="#">
        
          <i class="fa fa-list"></i>
        </a>
      </li>
    </ul>
  
</div>

      </div>
      <div id="share-options-bar" class="share-options-bar" data-behavior="5">
  <i id="btn-close-shareoptions" class="fa fa-close"></i>
  <ul class="share-options">
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fgaohaihang.gitee.io%2Fghhs_technology_blog%2F2016%2F07%2Fgit%25E4%25B9%258B%25E4%25B8%2580%25E9%2594%25AE%25E4%25B8%2589%25E8%25BF%259E%25E5%2590%2588%25E4%25BD%259C%25E5%25BC%2580%25E5%258F%2591%2F">
          <i class="fa fa-facebook-official"></i><span>分享到 Facebook</span>
        </a>
      </li>
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://twitter.com/intent/tweet?text=https%3A%2F%2Fgaohaihang.gitee.io%2Fghhs_technology_blog%2F2016%2F07%2Fgit%25E4%25B9%258B%25E4%25B8%2580%25E9%2594%25AE%25E4%25B8%2589%25E8%25BF%259E%25E5%2590%2588%25E4%25BD%259C%25E5%25BC%2580%25E5%258F%2591%2F">
          <i class="fa fa-twitter"></i><span>分享到 Twitter</span>
        </a>
      </li>
    
      <li class="share-option">
        <a class="share-option-btn" target="new" href="https://plus.google.com/share?url=https%3A%2F%2Fgaohaihang.gitee.io%2Fghhs_technology_blog%2F2016%2F07%2Fgit%25E4%25B9%258B%25E4%25B8%2580%25E9%2594%25AE%25E4%25B8%2589%25E8%25BF%259E%25E5%2590%2588%25E4%25BD%259C%25E5%25BC%2580%25E5%258F%2591%2F">
          <i class="fa fa-google-plus"></i><span>分享到 Google&#43;</span>
        </a>
      </li>
    
  </ul>
</div>
<div id="share-options-mask" class="share-options-mask"></div>
    </div>
    
    <div id="about">
  <div id="about-card">
    <div id="about-btn-close">
      <i class="fa fa-remove"></i>
    </div>
    
      <img id="about-card-picture" src="http://img.qq22.com.cn/uploads/4134/gubtyqxfhz2.jpg?68513786" alt="作者的图片" />
    
    <h4 id="about-card-name">唐宋缘明卿</h4>
    
      <div id="about-card-bio">弱小的人，才习惯嘲讽与否定；内心强大的人，从不吝啬赞美与鼓励。</div>
    
    
      <div id="about-card-job">
        <i class="fa fa-briefcase"></i>
        <br/>
        python全栈工程师
      </div>
    
    
      <div id="about-card-location">
        <i class="fa fa-map-marker"></i>
        <br/>
        中国 北京
      </div>
    
  </div>
</div>

    

    
  
    
      <div id="cover" style="background-image:url('https://gaohaihang.gitee.io/ghhs_technology_blog/images/cover.jpg');"></div>
    
  


    
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.7/js/jquery.fancybox.min.js" integrity="sha256-GEAnjcTqVP+vBp3SSc8bEDQqvWAZMiHyUSIorrWwH50=" crossorigin="anonymous"></script>


<script src="https://gaohaihang.gitee.io/ghhs_technology_blog/js/script-pcw6v3xilnxydl1vddzazdverrnn9ctynvnxgwho987mfyqkuylcb1nlt.min.js"></script>


<script lang="javascript">
window.onload = updateMinWidth;
window.onresize = updateMinWidth;
document.getElementById("sidebar").addEventListener("transitionend", updateMinWidth);
function updateMinWidth() {
  var sidebar = document.getElementById("sidebar");
  var main = document.getElementById("main");
  main.style.minWidth = "";
  var w1 = getComputedStyle(main).getPropertyValue("min-width");
  var w2 = getComputedStyle(sidebar).getPropertyValue("width");
  var w3 = getComputedStyle(sidebar).getPropertyValue("left");
  main.style.minWidth = `calc(${w1} - ${w2} - ${w3})`;
}
</script>

<script>
$(document).ready(function() {
  hljs.configure({ classPrefix: '', useBR: false });
  $('pre.code-highlight > code, pre > code').each(function(i, block) {
    if (!$(this).hasClass('codeblock')) {
      $(this).addClass('codeblock');
    }
    hljs.highlightBlock(block);
  });
});
</script>


  
    
      <script>
        var disqus_config = function () {
          this.page.url = 'https:\/\/gaohaihang.gitee.io\/ghhs_technology_blog\/2016\/07\/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91\/';
          
            this.page.identifier = '\/2016\/07\/git%E4%B9%8B%E4%B8%80%E9%94%AE%E4%B8%89%E8%BF%9E%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91\/'
          
        };
        (function() {
          
          
          if (window.location.hostname == "localhost") {
            return;
          }
          var d = document, s = d.createElement('script');
          var disqus_shortname = 'hugo-tranquilpeak-theme';
          s.src = '//' + disqus_shortname + '.disqus.com/embed.js';

          s.setAttribute('data-timestamp', +new Date());
          (d.head || d.body).appendChild(s);
        })();
      </script>
    
  




    
  </body>
</html>

